#pragma once
#include "Runtime/Platform/GenericApplication.h"
#include "Runtime/Engine/Viewport.h"
#include "WindowsWindow.h"
namespace Alice{
    class GameViewportClient;
    class WindowsApplication : public GenericApplication{
    public:
        HINSTANCE mHInstance;
        HWND mHWND;
        GameViewportClient* mGameViewportClient;
        bool mbQuit;
        WindowsApplication(HINSTANCE inHInstance);
        int32 ProcessMessage(HWND inHWND, uint32 inMSG, WPARAM inWParam, LPARAM inLParam);
        static WindowsApplication*InitializeWindowsApplication(void*inParam);
        static WindowsApplication*GetWindowsApplication();
        static LRESULT CALLBACK AppWndProc(HWND inHWND, uint32 inMSG, WPARAM inWParam, LPARAM inLParam);
        static WindowsApplication* CreateWindowsApplication( const HINSTANCE InstanceHandle, const HICON IconHandle );
        GenericWindow*MakeWindow()override;
        void InitializeWindow(GenericWindow* Window,GenericWindow* inParentWindow, const bool bShowImmediately )override;
        void PumpMessages( const float TimeDelta ) override;
        void ProcessDeferredEvents( const float TimeDelta ) override;
        void Tick ( const float TimeDelta ) override;
    };
}